/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

/**
 *
 * @author menderleit
 */
public class JResult {

    public final boolean success;
    public final String message;
    private Object returnedObj;

    public JResult(boolean success) {
        this.success = success;
        this.message = null;
        this.returnedObj = null;
    }

    public JResult(boolean success, String message) {
        this.success = success;
        this.message = message;
        this.returnedObj = null;
    }

    public JResult(boolean success, Object returnedObj) {
        this.success = success;
        this.message = null;
        this.returnedObj = returnedObj;
    }

    public JResult(boolean success, String message, Object returnedObj) {
        this.success = success;
        this.message = message;
        this.returnedObj = returnedObj;
    }
    
    public Object getReturnedObject() {
        return returnedObj;
    }
}
